package zju.ccnt.rest.api;

import org.hibernate.validator.constraints.Length;
import zju.ccnt.rest.service.util.constant.RankListType;
import zju.ccnt.rest.service.util.sql.SqlPersistence;
import zju.ccnt.rest.service.validation.ValidEnumValue;

import javax.validation.constraints.NotNull;

/**
 * Created by zha on 14/11/20.
 */
public class ApiCreateRankList {
    @NotNull
    private String businessId;
    @NotNull
    @Length(max = 256)
    private String name;

    private String description;
    @NotNull
    private boolean isPublic;
    //todo
    @NotNull
    private SqlPersistence sql;
    @NotNull
    //todo 检测是否为有效的榜单类型 @see RankListType
    @ValidEnumValue(enumClassName = RankListType.class)
    private String type;
    private int weight;

    public ApiCreateRankList(){}

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isPublic() {
        return isPublic;
    }

    public void setPublic(boolean isPublic) {
        this.isPublic = isPublic;
    }

    public SqlPersistence getSql() {
        return sql;
    }

    public void setSql(SqlPersistence sql) {
        this.sql = sql;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
}
